package com.zan.pattern.singleton.demo1;

/**
 * @Author Zan
 * @Create 2024/4/23 11:02
 * @Description : TODO(请用一句话描述该类的功能)
 * @ClassName: Client
 */
public class Client {
    public static void main(String[] args) {
        // 创建Singleton类的对象
        Singleton instance1 = Singleton.getInstance();

        Singleton instance2 = Singleton.getInstance();

        // 判断获取到的两个是否是同一个对象
        System.out.println(instance1 == instance2); // true
    }
}
